import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../components/login/Login";
import Container from '../components/Container'
import HomeContainer from "../components/tabbar/HomeContainer";
import MenberContainer from "../components/tabbar/MenberContainer";
import ShopcarContainer from "../components/tabbar/ShopcarContainer";
import SearchContainer from "../components/tabbar/SearchContainer";
import Newslist from "../components/news/Newslist";
import Newsinfo from "../components/news/Newsinfo";
import Photolist from "../components/photos/Photolist";
import Photoinfo from "../components/photos/Photoinfo";
import Goodslist from "../components/goods/Goodslist";
import Goodsinfo from "../components/goods/Goodsinfo";
import Goodsdesc from "../components/goods/Goodsdesc";
import Goodscomment from "../components/goods/Goodscomment";


Vue.use(VueRouter)

  const routes = [
    { path: '/', redirect: '/Login' },
    { path: '/Login', component: Login },
    { path: '/container', component: Container, redirect: '/home', children: [
        { path: '/home', component: HomeContainer},
        { path: '/member', component: MenberContainer },
        { path: '/shopcar', component: ShopcarContainer },
        { path: '/search', component: SearchContainer },
        { path: '/home/newslist', component: Newslist },
        { path: '/home/newsinfo/:id', component: Newsinfo },
        { path: '/home/photolist', component: Photolist },
        { path: '/home/photoinfo/:id', component: Photoinfo },
         { path: '/home/goodslist', component: Goodslist },
         { path: '/home/goodsinfo/:id', component: Goodsinfo },
         { path: '/home/goodsdesc/:id', component: Goodsdesc },
         { path: '/home/goodscomment/:id', component: Goodscomment }

        ]}
  ]

const router = new VueRouter({
  routes,
  linkActiveClass: 'mui-active'
})

export default router
